package com.wcs.exam.controller.admin;

import com.wcs.exam.common.base.Result;
import com.wcs.exam.common.base.page.Page;
import com.wcs.exam.controller.admin.biz.AdminSysLogBiz;
import com.wcs.exam.controller.admin.req.AdminSysLogPageReq;
import com.wcs.exam.controller.admin.resp.AdminSysLogPageResp;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Admin-后台操作日志表
 *
 * @author wcs
 * @since 2024-07-06
 */
@Tag(name = "Admin-后台操作日志表")
@RestController
@RequiredArgsConstructor
@RequestMapping("/v1/admin/sys/log")
public class AdminSysLogController {

    @NotNull
    private final AdminSysLogBiz biz;

    @Operation(summary = "后台操作日志表-分页")
    @GetMapping(value = "/page")
    public Result<Page<AdminSysLogPageResp>> page(@ModelAttribute AdminSysLogPageReq req) {
        return biz.page(req);
    }

}
